/**
 * Hackystat Version 8 Framework
 * Sensor Data Viewer Widget
 */
package org.hackystat.ui.sensordataviewer.client.common;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Asynchronous remote procedure call interface for getting sensor data from a RESTlet Sensorbase
 * server. Returns a formatted description of the sensor data over the requested interval.
 * 
 * @author David J. Nickles
 */
public interface RPCRemoteServiceAsync {
  
  /**
   * Return a formatted description of the requested sensor data on the specified interval.
   * @param host the URI for the SensorBase
   * @param project the project of interest
   * @param user user to authentication
   * @param password user password for authentication
   * @param startXmlTime of interval
   * @param endXmlTime of interval
   * @param callback address of return function
   */
  public void getMod(String host, String project, String user, String password, 
      String startXmlTime, String endXmlTime, AsyncCallback callback);

  /**
   * Returns true if the passed host is a SensorBase host.
   * 
   * @param host the URI for the SensorBase
   * @param callback the re-entry method
   */
  public void isHost(String host, AsyncCallback callback);

  /**
   * Returns true if the user and password is registered as a user with this host.
   * 
   * @param host the URI for the SensorBase
   * @param user user to authentication
   * @param password key for authentication
   * @param callback the re-entry method
   */
  public void isRegistered(String host, String user, String password, AsyncCallback callback);

  /**
   * Registers the user with this host.
   * 
   * @param host the URI for the SensorBase
   * @param user user to authentication
   * @param callback the re-entry method
   */
  public void registerUser(String host, String user, AsyncCallback callback);
  
  /**
   * Returns the version number from the Manifest file.
   * 
   * @param callback the re-entry method
   */
  public void version(AsyncCallback callback);
  
  /**
   * Returns the host uri from the properties file.
   * 
   * @param callback the re-entry method
   */
  public void getHost(AsyncCallback callback);
  
  /**
   * Return a formatted description of the requested sensor data on the specified interval.
   * @param host the URI for the SensorBase
   * @param user user to authentication
   * @param password user password for authentication
   * @param hrefList the list of hrefs for the sensor data items
   * @param callback the re-entry method
   * 
   * @gwt.typeArgs hrefList <java.lang.String>
   */
  public void getHrefs(String host, String user, String password, List hrefList, 
      AsyncCallback callback);
}